package com.ncd.disease.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ncd.disease.domain.RetPatientInfo;
import com.ncd.disease.mapper.RetPatientInfoMapper;
import com.ncd.disease.service.IRetPatientInfoService;
import org.springframework.stereotype.Service;

/**
 * 病人既往史Service业务层处理
 * 
 * @author zhouxin
 * @date 2024-03-08
 */
@Service
public class RetPatientInfoServiceImpl extends ServiceImpl<RetPatientInfoMapper,RetPatientInfo> implements IRetPatientInfoService
{

    /**
     * 查询病人既往史
     * 
     * @param patId 病人基本信息id
     * @return 病人既往史
     */
    @Override
    public RetPatientInfo selectRetPatientInfoByPatId(Long patId,Long diaId)
    {
        return this.getOne(new LambdaQueryWrapper<>(RetPatientInfo.class).eq(RetPatientInfo::getPatId,patId).eq(RetPatientInfo::getPatiDiaId,diaId));
    }


}
